package com.xjprojectc.business.service.impl;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import com.tech.framework.service.impl.BaseServiceImpl;
import com.xjprojectc.business.pojo.T_prepaidcard;
import com.xjprojectc.business.service.PrepaidcardService;

@SuppressWarnings("unchecked")
public class PrepaidcardServiceImpl extends BaseServiceImpl implements PrepaidcardService{
	
	public List<T_prepaidcard> getPrepaidcardByPager(T_prepaidcard prepaidcard) {
		return find(T_prepaidcard.class.getName()+".selectPaged", prepaidcard);
	}
	
	public List<T_prepaidcard> getPrepaidcardByList(T_prepaidcard prepaidcard) {
		return find(T_prepaidcard.class.getName()+".select", prepaidcard);
	}

	public T_prepaidcard getOnePrepaidcard(String id) {
		return (T_prepaidcard) find(T_prepaidcard.class.getName()+".selectById",id).get(0);
	}

	public int getPageCount(T_prepaidcard managerinfo) {
		return Integer.parseInt(find(T_prepaidcard.class.getName()+".selectCount",managerinfo).get(0).toString());
	}
	
	public List<T_prepaidcard> getPrepaidcardByCount(T_prepaidcard prepaidcard) {
		return find(T_prepaidcard.class.getName()+".selectCountDate", prepaidcard);
	}
	
	@SuppressWarnings("unchecked")
	public boolean addPrepaidcard(T_prepaidcard prepaidcard) {
		boolean bool = false;
		try {
			this.insert(prepaidcard);
			bool = true;
		} catch (Exception e) {
		}
		return bool;
	}

	public boolean delPrepaidcard(T_prepaidcard prepaidcard) {
		boolean bool = false;
		try {
			remove(prepaidcard);
			bool = true;
		} catch (Exception e) {
		}
		return bool;
	}


	public boolean updatePrepaidcard(T_prepaidcard prepaidcard) {
		boolean bool = false;
		try {
			update(prepaidcard);
			bool = true;
		} catch (Exception e) {
		}
		return bool;
	}
	
	

	
}
